package com.xls.app.controller;
import com.xls.app.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserController {
        @Autowired
    private UserService userService;
        @RequestMapping("/listPageUsers")
    public Map<String,Object>listPageUsers(Integer page,Integer rows,String uname){
            Map<String,Object> map=new HashMap<>();
            map.put("total",userService.countUsers(uname));
            map.put("rows",userService.listPageUsers(page,rows,uname));
            return map;
        }

}
